
class Tools{
    constructor(){}
    //用来返回 Promise 对象
    promise(fn,...b){
        // ...b 用于获取多余的参数 b = [b1,b2,b3] ...b = b1,b2,b3
        return new Promise((resolve,reject) => {
            fn(...b,results => {
                resolve(results)
            })
        })
    }
}
module.exports = Tools;
